package com.itheima.sh.clients.fallback;

import com.itheima.sh.clients.UserFeignApi;
import com.itheima.sh.pojo.User;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Version: V1.0
 */
@Component
public class UserFeignApiFallBack implements UserFeignApi {

    /**
     * feign 降级方法
     */
    @Override
    public User queryById(String username) {
        User user = new User();
        user.setUsername(username);
        user.setName("UserFeignApiFallBack 暂停服务");

        return user;
    }
}
